/**
 * Created By zhangQ 2018/2/20
 * 用户模块路由配置
 */
// import '@views/userModule/findPwd'
const index = () => import(/* webpackChunkName: "userModule" */ '@views/userModule')
const login = () => import(/* webpackChunkName: "userModule" */ '@views/userModule/login')
const findPwd = () => import(/* webpackChunkName: "userModule" */ '@views/userModule/findPwd')
const reg = () => import(/* webpackChunkName: "userModule" */ '@views/userModule/register')
const menuTest = () => import(/* webpackChunkName: "userModule" */ '@views/userModule/userCenter/menuTest')
// 路由是否验证
let required = false

let routers = []
/* 前端首页根路由 */
let userModuleRouter = {
  path: '/user',
  name: 'userModule',
  component: index,
  props: true,
  redirect: '/user/login',
  meta: { role: [], activeMenu: 'userModule', required: required },
  children: [
    {
      path: 'login',
      name: 'login',
      component: login,
      meta: { role: [], activeMenu: 'login', required: required }
    },
    {
      path: 'findpassword',
      name: 'findPwd',
      component: findPwd,
      meta: { role: [], activeMenu: 'findPwd', required: required }
    },
    {
      path: 'reg',
      name: 'reg',
      component: reg,
      meta: { role: [], activeMenu: 'reg', required: required }
    },
    {
      path: 'login_board',
      name: 'login_board',
      component: login,
      meta: { role: [], activeMenu: 'login_board', required: required }
    },
    {
      path: 'menu_test',
      name: 'menuTest',
      component: menuTest,
      meta: { role: [], activeMenu: 'login_board', required: required }
    }
  ]
}

routers.push(userModuleRouter)

export default routers
